package com.zl.gmadmin.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zl.gmadmin.entity.SysDict;
import com.zl.gmadmin.payload.DictQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2021/4/12 11:38
 */
@Mapper
public interface SysDictMapper  extends BaseMapper<SysDict> {

    /**
     * 通过名称查询字典
     * @param name
     * @return
     */
    List<SysDict> findDictByName(String name);

    /**
     * 分页查询字典和详情
     * @param sysDictPage
     * @param wrapper
     * @return
     */
    IPage<SysDict> selectDictAndDetailsPage(Page<SysDict> sysDictPage,@Param(Constants.WRAPPER) QueryWrapper<SysDict> wrapper);
}
